package com.cn.por.biz.userRole.controller;

import java.util.List;
import com.cn.por.biz.userRole.entity.UserRole;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import com.cn.por.biz.userRole.service.UserRoleService;

@RestController
@RequestMapping("/web/userRole")
public class UserRoleController   {
	
	@Autowired
	private UserRoleService userRoleService;
	
	@GetMapping("/getById")
	public UserRole getById ( String id){
		return userRoleService.getById(id);
	}
	

	@PostMapping("/getList")
	public List<UserRole> getList (@RequestBody UserRole userRole){
		return userRoleService.getList(userRole);
	}
	

	@GetMapping("/updateById")
	public Integer updateById ( String id){
		return userRoleService.updateById(id);
	}
	

	@PostMapping("/addOne")
	public Integer addOne (@RequestBody UserRole userRole){
		return userRoleService.addOne(userRole);
	}
	
}